#ifndef __COMMON_H__
#define __COMMON_H__
#include <assert.h>
#include <stdlib.h>
#include "define.h"

#ifdef WIN32
#include <time.h>
#include <vector>
#include <map>
#include <list>
#include <string>
#include <string.h>
#else
#include <errno.h>
#include <pthread.h>
#include <sys/time.h>
#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#endif
#ifdef WIN32
#include <conio.h>
#include <io.h>
#include <direct.h>
#include <stdlib.h>

#endif
void my_sleep(unsigned long nSecord);
unsigned short crc_16(char *data_p,long length);
unsigned long GetTimeStamp(void);
int CheckBuf(char *pData, unsigned int nDataLen, int &nCmd, int &nSendId, int &nPacketNum, int &nPacketLen);
void GetTime(char *szTime);
unsigned long my_GetLastError();
string GBKToUtf8(const char* strGBK, int nLen);
string Utf8ToGBK(const char* strUtf8, int nLen);
#endif
